package com.wenhao.newcode.huawei;

import java.util.Scanner;

/**
 * @author Wenhao Tong
 * @create 2021-07-15 13:57
 */
public class MainHJ82 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            String next = scanner.next();
            String[] numbers = next.split("/");
            int a = Integer.parseInt(numbers[0]);
            int b = Integer.parseInt(numbers[1]);
            int r,q;
            if (b % (a - 1) == 0) {
                System.out.println();
            }
            while (a != 1) {
                if (b % (a - 1) == 0) {
                    System.out.println("1/" + b / (a - 1) + "+");
                } else {
                    q = b / a;
                    r = b % a;
                    a = a - r;
                    b = b * ( q + 1);
                    System.out.print("1/" + (q + 1) + "+");
                }
            }
            System.out.print("1/" + b);
            System.out.println();
        }
    }
}
